home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / 422mods.zip / DR02.422 < prev    next >
Text File  |  1993-03-04  |  5KB  |  186 lines

  1. DR02.MOD  Reworks the Q-scan and N-Scan!
  2. Dr. Tweez #1 @3653
  3. Sat Feb 27 16:52:36 1993
  4. ┌────────────────────────────────────────────────────────────────────────────┐
  5. │ Mod Name      : DR02.MOD            Mod Author: Dr. Tweez 1@3653 SOLARnet  │
  6. │ Difficulty    : ██▒▒▒▒▒▒▒▒                                1@3650 GATEWAY   │
  7. │ WWIV Version  : 4.22                                                       │
  8. │ Mod Date      : 02/28/93                                                   │
  9. │ Files Affected: MSGBASE1.C, FCNS.H                                         │
  10. │ Description   : Reworks the Q-Scan, and N-Scan Funtions                    │
  11. └────────────────────────────────────────────────────────────────────────────┘
  12.  
  13. ══[ Description ]═════════════════════════════════════════════════════════════
  14.  
  15.     I found this mod from Rocker, but it was for 4.20, so I reworked it and got
  16. it to work on 4.22, I dont know if this has been released for 4.22 before, but
  17. hey I didnt see it.  This also uses one void from Tolkeins ENHANCE.C file.
  18.  
  19. ══[ Step 1 ]══════════════════════════════════════════════════════════════════
  20.  
  21. Back up dat source!
  22.  
  23. ══[ Step 2 ]══════════════════════════════════════════════════════════════════
  24.  
  25. Load up FCNS.H and put this in at the end of COM.C:
  26.  
  27. void clearscreen();     /*from Tolkeins ENHACNE.C*/
  28.  
  29. Save FCNS.H and move on.
  30.  
  31. ══[ Step 3 ]══════════════════════════════════════════════════════════════════
  32.  
  33. Load up COM.C and place this void at the end of the file:
  34.  
  35.  
  36. void clearscreen()      /*From Tolkeins ENHANCE.C*/
  37. /*
  38.  * This function clears the screen, using ANSI escape codes if the user
  39.  * has ANSI toggled on, else using the normal WWIV method of spitting out
  40.  * an ASCII 012.
  41.  *
  42.  */
  43. {
  44.   if (okansi()) {
  45.     outchr(12);
  46.     outstr("\x1b[2J");
  47.   } else {
  48.     outchr(12);
  49.   }
  50. }
  51.  
  52. Save COM.C.
  53.  
  54. ══[ Step 4 ]══════════════════════════════════════════════════════════════════
  55.  
  56. Load up MSGBASE1.C and replace these voids:
  57.  
  58. void qscan(int bn, int *ns)
  59. void nscan(int ss)
  60.  
  61. with these voids:
  62.  
  63. void qscan(int bn, int *ns)
  64. {
  65.   int i,nextsub,os,sn;
  66.   char s[81],s1[81];
  67.   unsigned long qscnptrx,sd;
  68.  
  69.   sn=usub[bn].subnum;
  70.  
  71.   if ((hangup) || (sn<0))
  72.     return;
  73.  
  74.   qscnptrx=qsc_p[sn];
  75.   sd=sub_dates[sn];
  76.   if ((!sd) || (sd>qscnptrx)) {
  77.     nextsub=*ns;
  78.     os=cursub;
  79.     cursub=bn;
  80.     i=1;
  81.  
  82.     iscan(cursub);
  83.  
  84.     clearscreen();
  85.  
  86.   if (okansi()) {
  87.     npr("7Now Scanning Sub-Board 2■\x1b[23D7Now Scanning Sub-Board 2■0");
  88.       nl();
  89.     sprintf(s,"7[══── 2[4 %s 2]7 ──══]0",
  90.         subboards[curlsub].name);
  91.     prt(1,s); nl();
  92.   } else {
  93.     pl("Now Scanning Sub-Board:");
  94.     sprintf(s,"8[ 9%s 8]",subboards[curlsub].name);
  95.     pl(s);
  96.   }
  97.     while ((i<=nummsgs) && (msgs[i].qscan<=qscnptrx))
  98.       ++i;
  99.     if ((nummsgs>0) && (msgs[nummsgs].qscan<=qscnptrx)) {
  100.       qsc_p[curlsub]=status.qscanptr-1;
  101.   }
  102.     if ((nummsgs>0) && (i<=nummsgs))
  103.       if (msgs[i].qscan>qsc_p[curlsub])
  104.         scan(i,2,&nextsub);
  105.  
  106.     cursub=os;
  107.     *ns=nextsub;
  108.  
  109.   } else {
  110.  
  111.     clearscreen();
  112.   if (okansi()) {
  113.      npr("9Now Scanning Sub-Board 2■\x1b[23D9Now Scanning Sub-Board ■0");
  114.      nl();
  115.      sprintf(s,"7[══── 2[4 %s 2]7 ──══]0",
  116.           subboards[sn].name);
  117.       prt(1,s);
  118.      nl();
  119.    } else {
  120.       pl("Now Scanning Sub-Board:");
  121.       sprintf(s,"[ %s ]",subboards[sn].name);
  122.       prt(1,s);
  123.       delay(10);
  124.     }
  125.   }
  126.    nl();
  127.     clearscreen();
  128. }
  129.  
  130. void nscan(int ss)
  131. {
  132.   int i,nextsub,abort,next;
  133.  
  134.   nl();
  135.   nextsub=1;
  136.  
  137.     clearscreen();
  138.   if (okansi())
  139.     pl("7[═── 2[4 Begin New Message Scan 2]7 ──═]0");
  140.    else
  141.     pl("[ Begin New Message Scan ]");
  142.  
  143.   for (i=ss; (usub[i].subnum!=-1) && (i<num_subs) && (nextsub) && (!hangup); i++) {
  144.     if (qsc_q[usub[i].subnum/32]&(1L<<(usub[i].subnum%32)))
  145.       qscan(i,&nextsub);
  146.     abort=next=0;
  147.     checka(&abort,&next);
  148.     if (abort)
  149.       nextsub=0;
  150.   }
  151.   clearscreen();
  152.  
  153.   if (okansi())
  154.     pl("7[═── 2[4 End Message Scan 2]7 ──═]0");
  155.    else
  156.     pl("[ End Message Scan ]");
  157.  
  158.     nl();
  159.      nl();
  160.   if ((nextsub) && (thisuser.sysstatus & sysstatus_nscan_file_system) &&
  161.     ((syscfg.sysconfig & sysconfig_no_xfer)==0)){
  162.      prt(2,"Scanning for new files . . . ");
  163.     nl();
  164.     nscanall();
  165.     nl();
  166.     prt(2,"Scan Done!");
  167.     nl();
  168.   }
  169. }
  170.  
  171.  
  172. Save MSGBASE1.C.
  173.  
  174.  
  175. ══[ Step 4 ]══════════════════════════════════════════════════════════════════
  176.  
  177. MAKE FCNS, and then recompile your BBS.
  178.  
  179. My thanks to Rocker for coming up with the idea, and Tolkein for ENHANCE.C
  180.  
  181. If ya use this mod drop me a line at
  182.  
  183. 1@3653  SOLARnet
  184. 1@3650  GATEWAY
  185.  
  186.